package com.qf.mapper;

import com.qf.entity.TChannel;
import com.qf.entity.TFilters;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/*
杨威
2021/11/6
15:21
*/
public interface FiltersMapper {
    @Select("select * from t_filters")
    List<TFilters> findAll();
    @Insert("insert into t_filters values (0,#{filters},#{filter_state})")
    int add(TFilters tFilters);
    @Delete("delete from t_filters where id=#{id}")
    int delete(Long id);
    @Update("update t_filters set filters=#{filters} and filter_state=#{filter_state}")
    int update(TFilters tFilters);
    @Select("select * from t_filters where id=#{id}")
    TChannel findById(Long id);
}
